<template>
    <div>
      <p>新内容：</p>
      <mu-table :fixedFooter="fixedFooter" :fixedHeader="fixedHeader"
                :enableSelectAll="enableSelectAll" :multiSelectable="multiSelectable"
                :selectable="selectable" :showCheckbox="showCheckbox">
        <mu-thead slot="header">
          <mu-tr>
            <mu-th tooltip="ID">ID</mu-th>
            <mu-th tooltip="名称">中文名</mu-th>
            <mu-th tooltip="rating">评分</mu-th>
            <mu-th tooltip="originalTitle">原名original_title</mu-th>
          </mu-tr>
        </mu-thead>
        <mu-tbody>
          <mu-tr v-for="item,index in newmovicelist"  :key="index" >
            <mu-td>{{index + 1}}</mu-td>
            <mu-td><a :href="item.alt">{{item.title}}</a></mu-td>
            <mu-td>{{item.rating.average}}</mu-td>
            <mu-td>{{item.original_title}}</mu-td>
          </mu-tr>
        </mu-tbody>


      </mu-table>
    </div>
</template>

<script>
    export default {
      data(){
        return {
          newmovicelist:{},
          fixedHeader: true,
          fixedFooter: false,
          selectable: false,
          multiSelectable: false,
          enableSelectAll: false,
          showCheckbox: false
        }
      },
      mounted(){
        this.newmovicelist={}
        this.newmovicelist = this.$store.state.unreadNews
        console.log('数据'+JSON.stringify(this.newmovicelist))
        this.changeUnReadyNews();

      },
      methods:{
        changeUnReadyNews(){
          console.log('清除数据'+JSON.stringify(this.newmovicelist))
          this.$store.commit('clearunreadNew')
        }
      }
    }
</script>

<style>

</style>
